
* APPENDIX G - DESCRIPTIVES FOR VOTERS, NONVOTERS AND CITIZENS ACROSS COUNTRIES


cd "${data}"
use"dataset.dta", clear 


 bysort country_year: egen LR_voter = mean(selfplacement) if voted==1
 bysort country_year: egen LR_nonvoter = mean(selfplacement) if voted==0
 bysort country_year: egen LR_mean = mean(selfplacement)

 bysort country_year: egen redistribution_voter = mean(redistribution) if voted==1
 bysort country_year: egen redistribution_nonvoter = mean(redistribution) if voted==0
 bysort country_year: egen redistribution_mean = mean(redistribution) 

 bysort country_year: egen regulation_voter = mean(regulation) if voted==1
 bysort country_year: egen regulation_nonvoter = mean(regulation) if voted==0
 bysort country_year: egen regulation_mean = mean(regulation)

 bysort country_year: egen samesex_voter = mean(samesexmarriage) if voted==1
 bysort country_year: egen samesex_nonvoter = mean(samesexmarriage) if voted==0
 bysort country_year: egen samesex_mean = mean(samesexmarriage)

 bysort country_year: egen immigration_voter = mean(immigration) if voted==1
 bysort country_year: egen immigration_nonvoter = mean(immigration) if voted==0
 bysort country_year: egen immigration_mean = mean(immigration)

 bysort country_year: egen laworder_voter = mean(laworder) if voted==1
 bysort country_year: egen laworder_nonvoter = mean(laworder) if voted==0
 bysort country_year: egen laworder_mean = mean(laworder) 

 bysort country_year: egen euintegration_voter = mean(euintegration) if voted==1
 bysort country_year: egen euintegration_nonvoter = mean(euintegration) if voted==0
 bysort country_year: egen euintegration_mean = mean(euintegration)

 bysort country_year: egen spending_voter = mean(spending) if voted==1
 bysort country_year: egen spending_nonvoter = mean(spending) if voted==0
 bysort country_year: egen spending_mean = mean(spending) 

 bysort country_year: egen environment_voter = mean(environment) if voted==1
 bysort country_year: egen environment_nonvoter = mean(environment) if voted==0
 bysort country_year: egen environment_mean = mean(environment) 
 
 collapse (mean) LR_voter LR_nonvoter LR_mean redistribution_voter redistribution_nonvoter redistribution_mean regulation_nonvoter regulation_voter regulation_mean spending_voter spending_nonvoter spending_mean samesex_nonvoter samesex_voter samesex_mean immigration_voter immigration_nonvoter immigration_mean laworder_voter laworder_nonvoter  laworder_mean environment_voter environment_nonvoter environment_mean euintegration_voter euintegration_nonvoter euintegration_mean, by(country_year)
 
 
graph bar LR_voter LR_nonvoter LR_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/selfplacement.gph", replace 
  graph export "${figures}/selfplacement.png", as(png) replace
  
 graph bar redistribution_voter redistribution_nonvoter redistribution_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/redistribution.gph", replace 
  graph export "${figures}/redistribution.png", as(png) replace

  graph bar regulation_voter regulation_nonvoter regulation_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/regulation.gph", replace 
  graph export "${figures}/regulation.png", as(png) replace

   graph bar samesex_voter samesex_nonvoter samesex_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/samesexmarriage.gph", replace 
  graph export "${figures}/samesexmarriage.png", as(png) replace

   graph bar immigration_voter immigration_nonvoter immigration_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/immigration.gph", replace 
  graph export "${figures}/immigration.png", as(png) replace

   graph bar laworder_voter laworder_nonvoter laworder_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/laworder.gph", replace 
  graph export "${figures}/laworder.png", as(png) replace

    graph bar euintegration_voter euintegration_nonvoter euintegration_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
	  graph save "${figures}/euintegration.gph", replace 
  graph export "${figures}/euintegration.png", as(png) replace

   graph bar spending_voter spending_nonvoter spending_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/spending.gph", replace 
  graph export "${figures}/spending.png", as(png) replace

	 graph bar environment_voter environment_nonvoter environment_mean, over(country_year, label(angle(90) labsize(2))) bar(1, color(black%70)) bar(2, color(black%30)) bar(3, color(navy%50)) yline(5, lpattern(dash)) xsize(tiny) legend(off)
  graph save "${figures}/environment.gph", replace 
  graph export "${figures}/environment.png", as(png) replace

